// 两个Time相加
#include <iostream>
using namespace std;

class Time {
private:
    int hour;
    int min;
    int sec;

public:
    Time();
    Time(int hour, int min, int sec) {
        Reset(hour, min, sec);
    }

    void Reset(int hour, int min, int sec) {
        this->hour = hour;
        this->min = min;
        this->sec = sec;
    }
    void ShowTime() {
        cout << "时间是 " << hour << ":" << min << ":" << sec << "\n";
    }

    Time operator+(Time rhs) {
        Time ret(hour+rhs.hour, min+rhs.min, sec+rhs.sec);

        ret.min += rhs.sec / 60;
        ret.hour += ret.min / 60;

        ret.sec %= 60;
        ret.min %= 60;

        return ret;
    }
};

int main() {
    Time first(3, 4, 5);
    Time second(10, 11, 12);
    Time third = first + second;
    third.ShowTime();

    first.Reset(15, 30, 55);
    second.Reset(3, 45, 15);
    third = first + second;
    third.ShowTime();

    cout << "完毕\n";
}